package dao;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;

import model.CD;

public class MusicaBD {

	public static ArrayList<CD> buscarCD(String desc, String tipo) {
		ArrayList<CD> lista = new ArrayList<CD>();
		try {
			String sql = "SELECT * FROM CD LIKE %?%";

			Connection con = null;
			PreparedStatement st = null;
			ResultSet rs = null;

			con = BD.getCon(tipo);
			st = con.prepareStatement(sql.toString());
			st.setString(1, desc);
			rs = st.executeQuery();

			while (rs.next()) {
				
				
//				lista.add(new Empregado(matr, nome, salario, lotacao));
			}
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return lista;
	}
}
